package org.onvivals.module.iot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.onvivals.common.base.BaseEntity;

import java.util.Date;

/**
 * @Author: Mr.ZS
 **/
@Schema
@Data
@TableName(value = "iot_message_log")
public class IotMessageLog extends BaseEntity<IotMessageLog> {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    @Schema(description="id")
    private Long id;

    /**
     * 消息ID
     */
    @TableField(value = "message_id")
    @Schema(description="消息ID")
    private String messageId;

    /**
     * 产品ID
     */
    @TableField(value = "product_id")
    @Schema(description="产品ID")
    private String productId;

    /**
     * 设备ID
     */
    @TableField(value = "device_id")
    @Schema(description="设备ID")
    private String deviceId;

    /**
     * 地址
     */
    @TableField(value = "message_url")
    @Schema(description="地址")
    private String messageUrl;

    /**
     * 问题
     */
    @TableField(value = "message_content")
    @Schema(description="问题")
    private String messageContent;

    /**
     * 录入时间
     */
    @TableField(value = "play_time")
    @Schema(description="录入时间")
    private Date playTime;

    @TableField(value = "`status`")
    @Schema(description="")
    private Integer status;

    /**
     * 时间
     */
    @TableField(value = "`time`")
    @Schema(description="时间")
    private Long time;

    @TableField(value = "sort_num")
    @Schema(description="")
    private Integer sortNum;

    @TableField(value = "`size`")
    @Schema(description="")
    private Long size;

    private static final long serialVersionUID = 1L;
}
